package IO流;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

public class 字节输出流 {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("C:\\Users\\gdq\\OneDrive\\桌面\\File文件夹\\a.txt");
        String str1 = new String("nihaowoshixiaokeli");
        byte[] bytes1 = str1.getBytes();
        fos.write(bytes1);
        String str2 = "\r\n";
        byte[] bytes2 = str2.getBytes();
        fos.write(bytes2);
        String str3 = "gdqyyds";
        byte[] bytes3 = str3.getBytes();
        fos.write(bytes3);
        fos.close();
    }

}
